<script>on mouseUpset cursor to watchgo homeend mouseUp</script>
</part>
<part>
<id>51</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>440</left>
<top>227</top>
<right>502</right>
<bottom>247</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>New</name>
<script>on mouseUp-- Requires handler: toggleMark-- create a new card and leaving the cursor into the name fieldset lockMessages to truedoMenu "New Card"toggleMark falseselect after text of bg field id 4end mouseUp</script>
</part>
<part>
<id>52</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>440</left>
<top>256</top>
<right>502</right>
<bottom>276</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Delete</name>
<script>on mouseUp-- Requires handler: deleteCurrentCardif the optionKey is down thendoMenu "Delete Card"exit mouseUpend ifif the number of cards in this bkgnd = 1 thenanswer "Can't delete the last database card." with "OK" -- ∆exit to hyperCardend ifanswer "Delete this data card?" with "Cancel" or "OK" -- ∆if it is "OK" then -- ∆set cursor to watchget number of this cardlock screendoMenu "Delete Card"go card it - 1unlock screenend ifend mouseUp</script>
</part>
<part>
<id>53</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>440</left>
<top>198</top>
<right>502</right>
<bottom>218</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Find…</name>
<script>on mouseUp-- Requires handler: findTextglobal DataBaseFindask "What text do you want to find?" with DataBaseFind -- ∆if it is empty then exit mouseUpelseput it into DataBaseFindfindTextend ifend mouseUp</script>
</part>
<part>
<id>76</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>444</left>
<top>99</top>
<right>470</right>
<bottom>122</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>20461</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Prev</name>
<script>on mouseDown-- go to the previous card-- if the shift key is down go to the previously marked cardvisual effect wipe right very fastif the shiftKey is down then go previous marked cardelse if the commandKey is down then go first card of this bkgndelse go prev card of this bkgndend mouseDownon mouseStillDown-- Requires handler: mouseDownmouseDownend mouseStillDown</script>
</part>
<part>
<id>77</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>477</left>
<top>99</top>
<right>502</right>
<bottom>122</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>22126</icon>
<textAlign>center</textAlign>
<font>Chicago</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Next</name>
<script>on mouseDown-- go to the next card-- if the shift key is down go to the next marked cardvisual effect wipe right very fastif the shiftKey is down then go next marked cardelse if the commandKey is down then go last card of this bkgndelse go next card of this bkgndend mouseDownon mouseStillDown-- Requires handler: mouseDownmouseDownend mouseStillDown</script>
</part>
<part>
<id>103</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>429</left>
<top>317</top>
<right>502</right>
<bottom>341</bottom>
</rect>
<style>checkbox</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Marked</name>
<script>on mouseUp-- Requires handler: toggleMarktoggleMark not marked of this cardend mouseUp</script>
</part>
<part>
<id>110</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <true /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>291</left>
<top>322</top>
<right>393</right>
<bottom>341</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>right</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Nummer</name>
<script></script>
</part>
<part>
<id>111</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>165</left>
<top>317</top>
<right>258</right>
<bottom>341</bottom>
</rect>
<style>checkbox</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <false /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Photocopy</name>
<script></script>
</part>
<part>
<id>113</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <true /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <false /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <true /> </lockText>
<rect>
<left>26</left>
<top>322</top>
<right>146</right>
<bottom>341</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>Markede</name>
<script></script>
</part>
<part>
<id>114</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <true /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>11</left>
<top>293</top>
<right>79</right>
<bottom>309</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>underline</textStyle>
<textHeight>16</textHeight>
<name>PubYear Label</name>
<script></script>
</part>
<part>
<id>115</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>78</left>
<top>293</top>
<right>149</right>
<bottom>309</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>PubYear</name>
<script></script>
</part>
<part>
<id>116</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <true /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>182</left>
<top>293</top>
<right>249</right>
<bottom>309</bottom>
</rect>
<style>transparent</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>underline</textStyle>
<textHeight>16</textHeight>
<name>PubCountry Label</name>
<script></script>
</part>
<part>
<id>117</id>
<type>field</type>
<visible> <true /> </visible>
<dontWrap> <false /> </dontWrap>
<dontSearch> <false /> </dontSearch>
<sharedText> <false /> </sharedText>
<fixedLineHeight> <true /> </fixedLineHeight>
<autoTab> <false /> </autoTab>
<lockText> <false /> </lockText>
<rect>
<left>248</left>
<top>293</top>
<right>411</right>
<bottom>309</bottom>
</rect>
<style>rectangle</style>
<autoSelect> <false /> </autoSelect>
<showLines> <false /> </showLines>
<wideMargins> <false /> </wideMargins>
<multipleLines> <false /> </multipleLines>
<reservedFamily> 0 </reservedFamily>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>left</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<textHeight>16</textHeight>
<name>PubCountry</name>
<script></script>
</part>
<part>
<id>121</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>444</left>
<top>129</top>
<right>470</right>
<bottom>154</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>30557</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>bold</textStyle>
<name>First Card of This Bkgnd</name>
<script>on mouseUpgo to first card of this backgroundend mouseUp</script>
</part>
<part>
<id>122</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>477</left>
<top>129</top>
<right>502</right>
<bottom>154</bottom>
</rect>
<style>transparent</style>
<showName> <false /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <true /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>26865</icon>
<textAlign>center</textAlign>
<font>Geneva</font>
<textSize>10</textSize>
<textStyle>bold</textStyle>
<name>Last Card of This Bkgnd</name>
<script>on mouseUpset cursor to busygo to last card of this backgroundend mouseUp</script>
</part>
<part>
<id>123</id>
<type>button</type>
<visible> <true /> </visible>
<reserved5> 0 </reserved5>
<reserved4> 0 </reserved4>
<reserved3> 0 </reserved3>
<reserved2> 0 </reserved2>
<reserved1> 0 </reserved1>
<enabled> <true /> </enabled>
<rect>
<left>440</left>
<top>170</top>
<right>502</right>
<bottom>190</bottom>
</rect>
<style>rectangle</style>
<showName> <true /> </showName>
<highlight> <false /> </highlight>
<autoHighlight> <false /> </autoHighlight>
<sharedHighlight> <true /> </sharedHighlight>
<family>0</family>
<titleWidth>0</titleWidth>
<icon>0</icon>
<textAlign>center</textAlign>
<font>Avant Garde</font>
<textSize>12</textSize>
<textStyle>plain</textStyle>
<name>Index</name>
<script>on mouseUpgo to card "Index"end mouseUp</script>
</part>
<content>
<layer>background</layer>
<id>75</id>
<text>Source:</text>
</content>
<content>
<layer>background</layer>
<id>80</id>
<text>Author(s):</text>
</content>
<content>
<layer>background</layer>
<id>79</id>
<text>Address:</text>
</content>
<content>
<layer>background</layer>
<id>82</id>
<text>Abstract:</text>
</content>
<content>
<layer>background</layer>
<id>81</id>
<text>Title:</text>
</content>
<content>
<layer>background</layer>
<id>114</id>
<text>Year:</text>
</content>
<content>
<layer>background</layer>
<id>116</id>
<text>Country:</text>
</content>
<name>Body</name>
<script>∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞Script from background script "Body" of DataBase stackTHE MESSAGE HANDLERS IN THIS SCRIPT:openCard,nd,closeBackground,arrowKey,sortCards,findTextreturnKey,enterKey, toggleMarkimportText,importTextFile,exportTextwriteExportedText,deleteCurrentCard, deleteAllCardsTHE FUNCTION HANDLERS IN THIS SCRIPT:lastHCItem,theFields∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞∞on openCard-- Requires handler: toggleMarktoggleMark the marked of this cardput "Card" && the number of this card && "of" && ¬the number of cards - 4 into bkgnd field id 110put "No. marked:" && the number of marked cards into bg field id 113pass openCardend openCardon openBackground-- Requires handler: setLocationCheckMarksetLocationCheckMark(short name of this card)end openBackgroundon closeBackgroundpush card -- Store current card for possible returnpass closeBackgroundend closeBackgroundon arrowKey whichKeyif (((whichKey is "left") or (whichKey is "Right")) and (the shiftKey is down))then go next marked cardelse pass arrowKeyend arrowKey----- Sort Handlers ------------------------------------------------on sortCards sortFieldput "sort cards of this bkgnd international" into sortBodyif sortField is "Title" thendo sortBody && "by bg field" && quote & sortField & quoteelse if sortField is "Author" thendo sortBody && "by bg field" && quote & sortField & quoteelse -- sourcedo sortBody && "by bg field" && quote & sortField & quoteend ifend sortCards----- Find Handlers ------------------------------------------------on findTextglobal DataBaseFindif DataBaseFind is empty then exit findTextfind DataBaseFindif the result is NOT empty thenbeepanswer "“" & DataBaseFind & "” was not found." -- ∆exit findTextend ifend findTexton returnKey-- Requires handler: findText-- if the cursor is not in a field or in the message box, then-- assume they want to find the text again.global DataBaseFindif DataBaseFind is not empty and the selectedField is emptythen findText else pass returnKeyend returnKeyon enterKey-- Requires handler: findText-- if the cursor is not in a field or in the message box, then-- assume they want to find the text again.global DataBaseFindif DataBaseFind is not empty and the selectedField is emptythen findText else pass enterKeyend enterKey----- Misc Handlers ------------------------------------------------on toggleMark isMarked-- hilite ('x') the card to reflect its 'marked' statusif isMarked thenset hilite of bg btn id 103 to trueset the marked of this card to trueelseset hilite of bg btn id 103 to falseset the marked of this card to falseend ifend toggleMark----- Import Text Operations --------------------------------- text files to be imported into the stack need to be in a specific-- format: chunks of information (such as Title, Author,-- etc.) should be separated by returnson importText-- Requires handlers: importTextFile-- import text a text fileanswer "Import text from a text file ?" ¬with "Cancel" or "Text File" -- ∆if it is "Cancel" then exit importText -- ∆else importTextFileend importTexton importTextFile fileName-- Requires handler: deleteCurrentCard-- Requires function handler: theFields-- import text from a text file stored in the correct formatif fileName is empty thenanswer file "Import text from what file?" of type "TEXT" -- ∆if the result is "Cancel" or it is empty then exit importTextFileput it into fileNameend ifset cursor to watchgo last card of background "Body" -- add the new cards to the end of the stackset lockRecent to trueset lockMessages to trueopen file fileNameput false into exitLooprepeat until exitLoopif the mouseClick thenanswer "Stop importing text?" with "No" or "Yes" -- ∆if it is "Yes" then exit repeat -- ∆end ifset cursor to busydoMenu "New Card"toggleMark falserepeat with fieldNum = 1 to (number of items in theFields() + 2)read from file fileName until returnif it is empty then -- out of textdeleteCurrentCard -- delete the stragglerput true into exitLoopexit repeatend ifif last char of it is return then delete last char of itif fieldNum > 2 then do "put it into" && ¬item fieldNum - 2 of theFields()end repeatif exitLoop then exit repeatread from file fileName until returnend repeatclose file fileNameset lockRecent to falseset lockMessages to falseend importTextFile----- Export Text Operations -------------------------------------on exportText-- Requires handler: writeExportedText-- Requires function handler: lastHCItem-- if shiftKey is down use only the marked cardsput true into useAllCards -- assume all cards as defaultif the shiftKey is down then put false into useAllCards -- use marked cardsif not useAllCards thenput "from marked cards" & space into prompt -- ∆put number of marked cards into numCardselseput empty into promptput number of cards in bg id 3664 into numCardsend ifask file "Export text" && prompt & "to the file:" with "DataBase Text File" -- ∆if the result is "Cancel" or it is empty then exit exportTextput it into fileNamewriteExportedText numCards,useAllCards,fileNameput "cards" into info -- assume more than 1 card as the default -- ∆if numCards = 1 then put "card" into info -- ∆answer "Text from" && numCards && info && ¬"was exported to the new file “" & lastHCItem(":",fileName) & "”." -- ∆end exportTexton writeExportedText numCards,useAllCards,fileName-- Requires function handler: theFieldslock screenif useAllCards then go card 1 of bg id 3664else go first marked cardopen file fileNamerepeat with currentCard = 1 to numCardsset cursor to busyput empty into theTextrepeat with count = 1 to (number of items in theFields())put value of (item count of theFields()) & tab after theTextend repeatput return after theTextwrite theText to file fileNameif not useAllCards then go next marked cardelse go next card of this bkgndend repeatclose file fileNameunlock screenend writeExportedText----- Utility Handlers --------------------------------------------on deleteCurrentCardlock screenpush previous carddoMenu "Delete Card"pop cardunlock screenend deleteCurrentCardon deleteAllCards-- a utility handler to clean all the cards out of the stacklock screenset lockMessages to truego cd 1 of bg "body"if the number of cds in this bg = 1 then exit deleteAllCardsrepeat the number of cds in this bg - 1set cursor to busyset the cantDelete of this cd to falsedoMenu delete cardend repeatend deleteAllCardsfunction lastHCItem delim,theText-- returns the portion of <theText> that follows the last <delim>if delim is in theText thenput lastHCItem(delim,char offset(delim,theText) + 1 to ¬length(theText) of theText) into theTextend ifreturn theTextend lastHCItem----- Data Handlers ----------------------------------------------function theFieldsreturn "bg fld id 4,bg fld id 97,bg fld id 6," & ¬"bg fld id 98,bg fld id 115,bg fld id 117,bg fld id 99"end theFields</script>